package com.cskaoyan.shopping.controller;

import com.cskaoyan.mall.commons.result.ResponseData;
import com.cskaoyan.mall.commons.result.ResponseUtil;
import com.cskaoyan.shopping.dto.PanelDto;
import com.cskaoyan.shopping.service.IProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Set;

/**
 * @author fan
 * @Description:
 * @since 2023/01/11 20:15
 */
@RestController
@RequestMapping("shopping")
public class RecommendController {

    @Autowired
    IProductService iProductService;

    @GetMapping("recommend")
    public ResponseData recommend(){
        List<PanelDto> recommendGoods = iProductService.getRecommendGoods();
        return new ResponseUtil<>().setData(recommendGoods);
    }
}
